<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="mylist">
        <li></li>
        <li></li>
        <li></li>
    </ul>
    <script>
        // 使用getElementsTagName(name)可以获取所有的子节点
        const el = document.getElementById('mylist')
        const items = el.getElementsByTagName('li')
        console.log(items) // HTMLCollection(3)[li,li,li]

        // 使用childNodes属性
        console.log(el.childNodes) /// NodeList(7)[text, li, ...] 包含回车键
    </script>
</body>
</html>